package com.enjoyor.soa.traffic.server.efoms.dubbo.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.enjoyor.soa.traffic.api.dto.efoms.WorkordersInfoDto;
import com.enjoyor.soa.traffic.api.service.dubbo.efoms.IDubboWorkordersInfoService;
import com.enjoyor.soa.traffic.server.efoms.dubbo.manage.ManageWorkordersInfoService;
import com.enjoyor.soa.traffic.util.pojo.Page;
import com.enjoyor.soa.traffic.util.pojo.ResultPojo;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

@SuppressWarnings("rawtypes")
@Service(version = "1.0.0", timeout = 4000)
public class DubboWorkordersInfoService implements IDubboWorkordersInfoService {
	
	@Autowired
	private ManageWorkordersInfoService manageWorkordersInfoService;
    
    @Override
    public ResultPojo selectWorkordersInfoById(String workordersId){
    	ResultPojo resultPojo = manageWorkordersInfoService.selectWorkordersInfoById(workordersId);
    	return resultPojo;
    }

    @Override
	public ResultPojo selectWorkordersInfoList(String workordersId, String repStartDate, String repEndDate,
			String devCategoryCode, String devTypeCode, String devId, String devName, String key, String devAreaCode,
			String devDeptId, String failureTypeCode, String failureDescrible, String repSourceCode,
			String workordersStatusCode, String lableClick){
		ResultPojo resultPojo = manageWorkordersInfoService.selectWorkordersInfoList(workordersId, repStartDate,
				repEndDate, devCategoryCode, devTypeCode, devId, devName, key, devAreaCode, devDeptId, failureTypeCode,
				failureDescrible, repSourceCode, workordersStatusCode, lableClick);
		return resultPojo;
	}
    
    @Override
    public ResultPojo selectWorkordersInfoPage(Page page, String workordersId, String repStartDate, String repEndDate,
			String devCategoryCode, String devTypeCode, String devId, String devName, String key, String devAreaCode,
			String devDeptId, String failureTypeCode, String failureDescrible, String repSourceCode,
			String workordersStatusCode, String orderSeq, String orderMode, String lableClick, List<String> noStatusCodeList) {
		ResultPojo resultPojo = manageWorkordersInfoService.selectWorkordersInfoPage(page, workordersId, repStartDate,
				repEndDate, devCategoryCode, devTypeCode, devId, devName, key, devAreaCode, devDeptId, failureTypeCode,
				failureDescrible, repSourceCode, workordersStatusCode, orderSeq, orderMode, lableClick, noStatusCodeList);
		return resultPojo;
    }
    
    @Override
    public ResultPojo insertWorkordersInfo(WorkordersInfoDto workordersInfoDto, String personName) {
    	ResultPojo resultPojo = manageWorkordersInfoService.insertWorkordersInfo(workordersInfoDto, personName);
    	return resultPojo;
    }
    
    @Override
    public ResultPojo updateWorkordersInfo(WorkordersInfoDto workordersInfoDto, String personName) {
    	ResultPojo resultPojo = manageWorkordersInfoService.updateWorkordersInfo(workordersInfoDto, personName);
    	return resultPojo;
    }
    
    @Override
    public ResultPojo deleteWorkordersInfo(String workordersId, String personName) {
    	ResultPojo resultPojo = manageWorkordersInfoService.deleteWorkordersInfo(workordersId, personName);
    	return resultPojo;
    }

	@Override
	public ResultPojo getOperationCount(String startTime,String endTime) {
		ResultPojo resultPojo = manageWorkordersInfoService.getOperationCount(startTime, endTime);
    	return resultPojo;
	}
}
